package servlets;

import java.io.*;
import javax.servlet.http.*;

public class ResponseWrapper extends HttpServletResponseWrapper {
	private CharArrayWriter buffer;

	public ResponseWrapper(HttpServletResponse response) {
		super(response);
		buffer = new CharArrayWriter();
	}

	@Override
	public PrintWriter getWriter() throws IOException {
		return new PrintWriter(buffer);
	}

	// Getter des privaten buffer
	public String getContent() {
		return buffer.toString();
	}

}
